<?php

namespace App\Http\Controllers\Home;

use App\Http\Controllers\Controller;
use App\Http\Resources\BannerResource;
use App\Models\Banner;
use Illuminate\Http\Request;

class BannerController extends Controller
{

    /**
     * 获取轮播图
     */
    public function __invoke()
    {
      $banner=Banner::all();
      return BannerResource::collection($banner);
    }
}
